/*
	Functor

	Code auto generated, and macros are not used for debug purpose
	Functor warps all detail of member function and normal function

	Notice:
	FunctorType -> BindType( ClassType( RetType( ArgList...)))

	@author Wolfhead
*/

#ifndef ACAPELLA_DELEGATE_FUNCTOR_HPP
#define ACAPELLA_DELEGATE_FUNCTOR_HPP

#include <acapella/traits/traits.h>
#include <acapella/shared_ptr.hpp>
#include <vector>

namespace acapella
{
namespace delegate
{
/*
	ClassStub is used by the functors which do not need to bind a class
*/
struct ClassStub{};

/*
	Functor Bind Type
		dynamic_bind - Functor type is bind dynamically
					Member Function can be binded with shared_ptr types
					all function with the right return value and arguments 
					can be binded
		static_bind  - Function type is bind statically
					less smarter but faster
*/
struct dynamic_bind{};
struct static_bind{};
typedef dynamic_bind default_bind_type;


/*
	functor type
	FunctorType -> BindType( ClassType( RetType( ArgList...)))
 */
template<typename FunctorType, typename BindType = default_bind_type, typename ClassType = ClassStub>
class functor{};

template<typename FunctorType, typename BindType = default_bind_type, typename ClassType = ClassStub>
class functor_list{};




/*
	functor_type determine a functor or a functor_list type
	by Function signature and BindType
 */
template<typename FunctionType, typename BindType>
struct functor_type{};


// please don't read this file...
// it will be huge and hard to understand
// read functor_gen_base.hpp instead
#include "functor_gen.hpp"

}
}






#endif

